<?php


  require("abifunktsioonid.php");
  if(isSet($_REQUEST["sort"])){
     $ained=kysiAineteAndmed($_REQUEST["sort"]);
  } else {
     $ained=kysiAineteAndmed();
  }
	
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
      <title>Direktori leht</title>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" media="screen" href="style.css" />
</head>
<body>
<div id="Direktortable">
<table>
<h1>Random õpilase tabel</h1>
       <tr>
         <th>Grupinimi</th>
         <th>Õpetaja</th>
         <th>Hinne</th>
		 <th>Töökirjeldus</th>
       </tr>
       <?php foreach($ained as $aine): ?>
         <tr>
           <td><?=$aine->grupinimi ?></td>
           <td><?=$aine->opetajanimi ?></td>
           <td><?=$aine->hinne ?></td>
		   <td><?=$aine->tookirjeldus ?></td>
         </tr>
       <?php endforeach; ?>
	  
	   </table>
</div>

</body>
</html>




    
